package kr.hkit.powerjava.chapter07.test;

import java.util.Scanner;

public class Banbok1_3 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int sum = 0;
		int a = 0;
		while (true) {
			System.out.print("정수를 입력을 하세요 : ");
			a = in.nextInt();
			sum += a;

			if (a == 0)
				break;
		}
		System.out.println("정수의 합은 " + sum + "입니다.");
	}
}
